#ex1
sentence='''One is always on a strange road, watching strange scenery and listening to strange music. Then one day
, you will find that the things you try hard to forget are already gone.'''
def word(sentence): 
    words={}
    L=''
    L2=[]
    cnt=-1
    number=0
    length=len(sentence)
    kk=0
    for letter in sentence:
        
        if ord(letter) >= 65 and ord(letter) <= 122:  
            L=L+letter
            cnt=len(L)
            number=number+1
            if number != length:
                continue
            else:
                kk=1
        else:
            if len(L) == cnt:
                m=0
                for s in L2:
                    if s == L:
                        words[s]=words[s]+1
                        m=1
                if m == 0:
                    temp={L:1}
                    L2.append(L)
                    words.update(temp)     
            L=''
            cnt=-1
            number=number+1
        if kk == 1:
            m=0
            for s in L2:
                if s == L:
                    words[s]=words[s]+1
                    m=1
            if m == 0:
                temp={L:1}
                L2.append(L)
                words.update(temp)
    return words
print(word(sentence))
